#pragma once
#include "../model/Figure.h"
#include "FigureView.h"
#include "CircleView.h"
#include "TriangleView.h"
#include "RectanguloView.h"
#include "PentagonView.h"
#include "HexagonView.h"

class FiguresViewFactory {
private:
	int idCount;

public:
	FiguresViewFactory() {idCount=0;}

	FigureView* builView(Figure* figure) {
		idCount++;
		
		switch (figure->getType()) {
			case 0: return new CircleView(figure, idCount); break;
			case 3: return new TriangleView(figure, idCount); break;
			case 4: return new RectanguloView(figure, idCount); break;
			case 5: return new PentagonView(figure, idCount); break;
			case 6: return new HexagonView(figure, idCount); break;
			default: return NULL; break;
		}
	}

	~FiguresViewFactory() {}
};
